< previous page page_289 next page >

Page 289
You see, the computer doesn't care what you do with those bits. It doesn't know what they mean. Giving meaning to those bits is the programmer's job. Visual Basic variables do this for you most of the time. API and DLL calls often don't. That's one of the reasons that you need to know what's going on behind the scenes.
Now let's say that you have four bits. Four bits are a nibble. Let's say that those bits each have a label indicating their position in the nibble, from Bit #0 to Bit #3. The possible values are as follows:
BIT #3BIT #2BIT #1BIT #0VALUE
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
101010
101111
110012
110113
111014
111115

Now we're getting somewhere. A nibble lets you count up to 16 values, in this case from 0 to 15. Are other values possible? What happens if we say that Bit #3 indicates whether a number is negative?
BIT #3BIT #2BIT #1BIT #0VALUE
00000
00011
00102
00113
01004
01015
01106
01117
10008
10017

(table continued on next page)

 
< previous page page_289 next page >